package com.angus.auth.form.front;

import com.angus.auth.form.PhoneLoginGroup;
import com.angus.auth.form.SendCodeGroup;
import com.angus.common.core.annotation.Device;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author liyanan
 * @date 2024/10/23 5:30 PM
 * @description
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Device
public class DeviceLoginBody {

    /**
     * 发送设备：
     * 1：手机
     * 2：邮箱
     */
    private String device;

    /**
     * 类型
     * 1：手机
     * 2：邮箱
     */
    private Integer type;

    /**
     * 使用场景
     * @see com.angus.common.core.enums.SendCodeScene
     */
    @NotNull(message = "使用场景不能为空",groups = {SendCodeGroup.class})
    private Integer scene;

    @NotEmpty(message = "验证码不能为空",groups = {PhoneLoginGroup.class})
    private String code;
}
